/**
 * @author shenw
 */
(function(){
	var root = pack('jshen.math');
	/**
	 * Convert number to integer.
	 */
	Number.method('integer', function(){
	    return Math[this < 0 ? 'ceil' : 'floor'](this);
	});
	root.method('randomInteger', function(min, max){
		if (min > max)
			return 0;
		else
			return Math.round(min + (max - min) * Math.random());
	});
})();
